#include <gtest\gtest.h>
#include <iostream> // allows program to perform input and output
#include <iomanip> // parameterized stream manipulators
#include <string> // program uses C++ standard string class
#include <cmath> // program uses C++ standard math library
#include "QuadraticFunction.h" // include definition of class QuadraticFunction
#include <complex>
using namespace std;
TEST(Test1, computeComplexSolutionTest){
     
   complex<double> X1, X2; // variables to hold the 2 real solutions
        complex<double>A1=1;
        complex<double>B1=-10;
        complex<double>C1=34;
	// use the Quadratic Formula to compute the 2 real solutions
	X1 = ( -B1 + sqrt( B1*B1 - 4.0*A1*C1 ) ) / ( 2.0 * A1 );
	X2 = ( -B1 - sqrt( B1*B1 - 4.0*A1*C1 ) ) / ( 2.0 * A1);
    
    
ASSERT_EQ(X1.real(),5);
}

TEST(Test2, computeComplexSolutionTest){
     
   complex<double> X1, X2; // variables to hold the 2 real solutions
        complex<double>A1=1;
        complex<double>B1=-10;
        complex<double>C1=34;
	// use the Quadratic Formula to compute the 2 real solutions
	X1 = ( -B1 + sqrt( B1*B1 - 4.0*A1*C1 ) ) / ( 2.0 * A1 );
	X2 = ( -B1 - sqrt( B1*B1 - 4.0*A1*C1 ) ) / ( 2.0 * A1);
    
    
ASSERT_EQ(X1.imag(),3);
}